<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>transition</title>
    <style>
        .pagename,.pagename a,.pagename a:before {
            display: inline-block;
            height: 2.5em;
            transition: all 0.3s ease-out;
            vertical-align: middle;
        }

        .pagename {
            color: #fff;
            line-height: 4em;
            margin-top: 1.3em;
        }

        .pagename a {
            overflow: hidden;
            border: 2px solid #fff;
            border-radius: 4px;
            font-size: 1.7em;
            margin: 0 0.4em;
            padding: 0 0.7em;
            position: relative;
            color: #fff;
            font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
            font-weight: 300;
            font-variant: normal;
            letter-spacing: 0.02em;
            text-align: center;
        }

        .pagename a:hover {
            color: #369;
            text-decoration: none;
        }

        .pagename a:before {
            content: "";
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            z-index: -1;
        }

        .pagename a:hover:before {
            top: 0;
            height: 3em;
            z-index: 9;
        }

    </style>
</head>
<body>
<div style="background: #808080;height: 100px">
    <span class="hover pagename redditname"><a href="http://www.reddit.com/r/web_design/">web_design</a></span>
</div>

<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script>
    $(function () {
        $('#btn-bigger').click(function () {
            $('.m-box').addClass('t-w')
        })
    })
</script>
</body>
</html>